package com.cs224u.experimental;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import edu.stanford.nlp.tagger.maxent.MaxentTagger;

public class POSTest {
  
  //private static String tagPath = "C:\\Documents and Settings\\Reecha\\workspace\\TwitterSentiment\\stanford-postagger-2008-09-28\\models\\left3words-wsj-0-18.tagger";
  private static String tagPath = "resources/left3words-wsj-0-18.tagger";
  

  public static void main(String[] args) throws Exception {
    MaxentTagger tagger = new MaxentTagger(tagPath);
    //String text= "Longer maturities are thought to indicate declining interest rates because they permit portfolio managers to retain relatively higher rates for a longer period .";
    String text= "American Cyanamid , a chemical and biotechnology company , said it exercised its option to buy out Fothergill & Harvey's 50% interest when Fothergill & Harvey was acquired by Courtaulds PLC , a British chemical and fibers company .";
//    String text= "The market again showed little interest_1 in further evidence of a slowing U.S. economy , and traders note that the market in recent weeks has taken its cues more from Wall Street than U.S. economic indicators .";
    //String text = "The notes became burdensome when reset provisions allowed their interest rate to be raised to 19.25 % last June . ";
    try {
      for(String pair: tagger.tagString(text).split(" ")){
        System.out.println(pair);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    
  }
}
